<script>	
	function sales_report_fn() 
	{ 
	 window.open("report_sales.php?from_sales_date="+$('#from_sales_date').val()+"&to_sales_date="+$('#to_sales_date').val(),"myNewWinsr","width=620,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes"); 
	   
	}
	function purchase_report_fn() 
	{ 
	 window.open("report_purchase.php?from_purchase_date="+$('#from_purchase_date').val()+"&to_purchase_date="+$('#to_purchase_date').val(),"myNewWinsr","width=620,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes"); 
	   
	} 
	
	function sales_purchase_report_fn() 
	{ 
	 window.open("report_purchase_all.php?from_sales_purchase_date="+$('#from_sales_purchase_date').val()+"&to_sales_purchase_date="+$('#to_sales_purchase_date').val(),"myNewWinsr","width=620,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes"); 
	   
	} 
	function report_by_invoice_fn() 
	{ 
	 window.open("sales_print.php?salenumber="+$('#salenumber').val(),"myNewWinsr","width=620,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes");    
	} 
	function payment_report_fn() 
	{ 
	 window.open("report_payment.php?from_payment_date="+$('#from_payment_date').val()+"&to_payment_date="+$('#to_payment_date').val(),"myNewWinsr","width=620,height=800,toolbar=0,menubar=no,status=no,resizable=yes,location=no,directories=no,scrollbars=yes");    
	} 
</script>
<script type="text/javascript">
$().ready(function() {
	$("#salenumber").autocomplete("autocomplete_saleid.php", {
		width: 160,
		autoFill: true,
		selectFirst: false
	});
		
});
</script>
<table class="bordered" width="770">
    <thead>
    <tr>
        <th>View Report </th>
    </tr>
    </thead>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" style="margin:20px 0px 0px 0px; font-size:14px;">
   <tr>
    <form action="sales_report.php" method="post" name="report_invoice" id="report_invoice" target="myNewWinsr">
      <td><strong>Sales Report By Invoice</strong></td>
      <td>Invoice ID</td>
      <td><input name="salenumber" id="salenumber" type="text"  style="width:80px;"></td>
      <td></td>
      <td></td>
      <td><input name="submit" type="button" value="Show" onClick='report_by_invoice_fn();'></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </form>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <form action="report_sales.php" method="post" name="sales_report" id="sales_report" target="myNewWinsr">
      <td><strong>Sales Report </strong></td>
      <td>From</td>
      <td><input name="from_sales_date" type="text" id="from_sales_date" style="width:80px;"></td>
      <td>To</td>
      <td><input name="to_sales_date" type="text" id="to_sales_date" style="width:80px;"></td>
      <td><input name="submit" type="button" value="Show" onClick='sales_report_fn();'></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </form>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  
  
  
</table>